Skip to content

ui: right-align card buttons + add PENDING peer to dummy-run fixture#26

Merged
robmsmt merged 9 commits into
mainfrom
robmsmt/right-align-buttons-and-pending-fixture
May 18, 2026
Merged

ui: right-align card buttons + add PENDING peer to dummy-run fixture#26
robmsmt merged 9 commits into
mainfrom
robmsmt/right-align-buttons-and-pending-fixture

Conversation

@robmsmt
Copy link
Copy Markdown
Contributor

@robmsmt robmsmt commented May 18, 2026

Summary

Three things, one PR — bundled because the third only works if the first two are in:

  1. Right-align action buttons in the expanded card (`justify-end` on the flex row). Both "Open in OpenWebUI" and "Metrics Dashboard" now sit flush right, matching the alignment of the labels block underneath.

  2. Include PR fix: surface PENDING peers under their served_model_name during boot #23 (server-side fallback to `labels.served_model_name`) so PENDING peers can render a card during the boot window. Without this, a peer that hasn't yet advertised a service has `id=""`, the frontend's worker_group_id → model_id map can't resolve it, and the peer is silently dropped. Cherry-picked from `robmsmt/show-pending-peers-by-served-model-name` — same commit, same tests. Closes fix: surface PENDING peers under their served_model_name during boot #23 as superseded.

  3. Add a real PENDING peer to the dummy-run fixture. Launched a fresh sml job, caught the dev mesh while it was still in OCF-PENDING (service: [], status: "pending", labels carry served_model_name + framework_args + expires_at), and dropped the snapshot into `dnt_table_dev_live.json`. Real shape, real hostname, real peer id — nothing synthesised.

Once merged + `make dummy-run`, the dashboard should show a model card titled `swiss-ai/Apertus-8B-Instruct-2509-rob-dev3` with a yellow "pending" pill instead of the green "ready" pill the other cards have.

Test plan

Depends on PR #25 (VITE_API_URL local fallback) to actually verify visually — without it the frontend hits prod and ignores the dummy-run backend.

🤖 Generated with Claude Code

robmsmt added 3 commits May 18, 2026 20:12
Before: when a launching peer is still in PENDING (no service advertised
yet), get_all_models surfaced it with id="" and worker_group_id set.
The frontend (ModelList.svelte) builds wgToModel from peers that already
carry an id, then drops any remaining id="" peer whose worker_group_id
doesn't appear in that map. During the brief PENDING window every peer
in the worker group is service-less, so wgToModel is empty for that
group and the replica is silently filtered out. By the time we COULD
render it, registrar.go flips status from PENDING to READY and advertises
the service in the same step — so PENDING is never actually visible on
the dashboard.

After: fall back to labels.served_model_name (already emitted by
model-launch's _ocf_labels on every peer) when synthesising the
no-service entry. The peer now has a real model id during boot, the
frontend's grouping succeeds, and the status pill renders "pending"
until the health check passes.

Tests updated: the multi-node-replica grouping test previously asserted
the follower kept id="". With served_model_name on every peer, both
peers in the group now resolve to the same id; we still verify the
shared worker_group_id keeps them in one replica. Added a defensive
test for the older-binary case (no served_model_name label) where the
id stays empty as before.
Right-align the OpenWebUI + Metrics Dashboard buttons inside the
expanded model card (`justify-end` on the flex row). Matches the
in-card details which are right-aligned by design.

Add a synthetic PENDING peer to the dummy-run fixture so /make dummy-run
shows what a booting model looks like — status: "pending", service:
[], served_model_name carried in labels. Hostname + peer id are
synthetic but realistic; framework_args resembles a 70B vLLM launch.
Caught the dev mesh while a fresh sml launch (job 2297439, --dev3) was
still in OCF-PENDING — service: [], status: "pending", labels carry
served_model_name. Real shape, real hostname, real peer id; nothing
hand-rolled.
@robmsmt robmsmt force-pushed the robmsmt/right-align-buttons-and-pending-fixture branch from a710e41 to 4ebdec0 Compare May 18, 2026 18:12
robmsmt added 6 commits May 18, 2026 20:16
The Extra labels pre-block used padEnd(18) — a fixed width copied from
the main-labels block where it makes columns line up with header /
follower entries. In the extras block there's typically just one entry
(framework_args, 14 chars), so the fixed pad inserts 4 extra spaces
between key and value with nothing to align them to. Reads like a
formatting bug.

Compute the pad from the actual keys present + 1. With framework_args
alone, that's padEnd(15) — one space between key and value. If more
labels show up later, they self-align.
- Button text "Open in OpenWebUI" → "Swiss AI Chat". The underlying URL
  still points at the OpenWebUI deployment, but users see "Swiss AI Chat"
  which matches the surface-level brand they actually interact with.
- Reorder so Metrics Dashboard (secondary, emerald) sits left of Swiss
  AI Chat (primary, black). Both still right-aligned as a group; the
  primary action lands at the right edge where the eye finishes scanning
  the card.
… order

- "Swiss AI Chat" → "Chat" and "Metrics Dashboard" → "Metrics". The
  expanded card sits below the model title that already says
  "swiss-ai/..." — repeating "Swiss AI" in the button label is noise,
  and "Dashboard" doesn't carry meaning past the icon.
- Restore Chat-first order so Metrics ends up at the right edge, where
  it lived before the brief mid-iteration swap.
The header line said "on 4 nodes × 4x GH200" for a model with 2
replicas of 4 nodes each — undercounting the actual resources by half.
Prepend the replica multiplier so the line describes total commitment:

  1 replica, 4 nodes      → "4 nodes × 4x GH200"
  2 replicas, 4 nodes each → "2 replicas × 4 nodes × 4x GH200"
  10 replicas, 1 node each → "10 replicas × 4x GH200"

The red ×N chip next to the title still shows the replica count
on its own; the topology line now expresses it in resource terms.
@robmsmt robmsmt merged commit f4b8fa1 into main May 18, 2026
2 checks passed
@robmsmt robmsmt deleted the robmsmt/right-align-buttons-and-pending-fixture branch May 18, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant